n = int(input())
for i in range(1, n + 1):
    print(' ' * (n - i), end='')
    print(''.join(str(j % 10) for j in range(1, 2 * i)))